<?php
/**
 * Created by PhpStorm.
 * Author: ljz
 * Date: 2023/5/03
 * Time: 16:00
 */

namespace App\store\models;


use App\common\models\BaseModel;

/**
 * Class OrderModel
 * @package app\common\models
 */
class UploadModel extends BaseModel
{
    public $table = 'upload_img';

    /**
     * 字段规则
     *
     * @return array
     */
    static public function rules()
    {
        return [
            'file_id' => 'required',
            'type' => 'required|int',
            'file' => 'max:5000',
        ];
    }

    /**
     * 字段验证返回错误信息
     *
     * @return array
     */
    static public function message()
    {
        return [
            'file_id.required' => '业务类型ID不能为空',
            'type.required' => '文件类型不能为空',
            'file.max' => '此文件超过最大存储限制',
        ];
    }

}
